<?
if(empty($article)) {
	__('ARTICLE_NOT_FOUND');	
} else { ?> 
<? $this->pageTitle = $article['Article']['title'].' - '.$this->pageTitle; ?>
<div class="article">
<? if($article['Article']['show_informations'] && !empty($article['Tag'])){ ?>
<div id="article_tags" style="background:#ddf8cc; margin: 1em 1em 1em 0;">
	<div class="rounded_ul">
	<div class="rounded_ur">
	<div class="rounded_ll">
	<div class="rounded_lr">
	<div style="padding: 1em;">
	<? __('TAGS'); ?>:
	<? foreach ($article['Tag'] as $tag): ?>
		<? echo $html->link($tag['name'],array('controller'=>'tags','action'=>'view',$tag['seo_link'])); ?>
	<? endforeach; ?>
	</div>
	</div>
	</div>
	</div>
	</div>
</div>
<? } ?>

<div id="text">
<h1><? echo $article['Article']['title']; ?></h1>

<? if($article["Article"]["show_author"]) { ?>
<p class="article_author">
<? __('AUTHOR'); echo ': '.$article['User']['name']; ?>, 
	<? __('CREATED'); echo ': '.$date -> timeAgoInWords($article['Article']['created']); ?>
</p>
<? } ?>

<? echo $texy -> show($article['Article']['intro_text'],true); ?>

<? echo $texy -> show($article['Article']['text'],true); ?>
</div>
<? if($article['Article']['show_informations']){ ?>
<p>
<a href="http://www.pridej.cz" onclick="return pridej_click_direct(pridej_url,pridej_title);" style="border:0;" target="_blank">
<? echo $html->image('pridaj-cz.jpg',array('alt'=>'Povedz o článku aj ostatným - www.pridej.cz')); ?></a>
<script type="text/javascript" src="http://pridej.cz/v1/pridej.js"></script>
<script type="text/javascript">
var pridej_url = '<?php echo 'http://'.RequestHandlerComponent::getReferrer().'/'.$_GET['url'];?>';
var pridej_title = '<?php echo $article['Article']['title'];?>';
</script>
</p>

<? include_once "rating.ctp"; ?>

<div id="recent_articles">
<? if(!empty($recentArticles)) { ?>
	<h3><? __('RECENT_ARTICLES'); ?></h3>
	<ul>
	<? foreach ($recentArticles as $recent): ?>
		<li><? echo $html->link($recent['Article']['title'],'/articles/'.$date -> niceShort($recent['Article']['created'],'Y/m/d').'/'.$recent['Article']['seo_link']); ?></li>	
	<? endforeach; ?>
	<li>...</li>
	<li><? echo $html->link(__('ALL_RECENT_ARTICLES',true),'/categories/view/'.$article['Category']['seo_link']) ?></li>
	</ul> 
<? } ?>
</div>

<? include_once "comment_all.ctp"; ?>

<? include_once "comment_add.ctp"; ?>
<? 
}
} ?>
</div>